package test.enba.mq.consumer.rabbitmq.header;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Service;

@Service
public class HeadersExchangeConsumer {

  @RabbitListener(queues = "headers-queue")
  public void receiveMessage(String message) {
    System.out.println("consumer1 Received message: " + message);
  }

  /*
   * 测试自动删除队列
   * */
  @RabbitListener(queues = "temp-queue2")
  public void receiveMessage2(String message) {
    System.out.println("temp-queue2 consumer1 Received message: " + message);
  }
}
